package com.dnw.base;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author diangoJ
 */

public class ApiConstant {
    /**
     * 接口根地址
     */
    public static final String BASE_SERVER_URL = "http://106.15.202.6:9090/";
//  public static final String BASE_SERVER_URL = "http://192.168.0.111:8080/";

    public static final List<String> BASE_KEYWORD = Lists.newArrayList("段子手","羞羞的福利","逗逗的小图","最羞逗","飞禽走兽","心灵鸡汤", "羞羞的推荐");

    /**
     * 段子类型
     */
    public enum ShyTypeEnum {
        RECOMMEND("recommend","推荐"),
        IMAGE("IMAGE","图片"),
        GIF("GIF","gif"),
        TEXT("TEXT","文字段子"),
        LIVE("LIVE","live"),
        SHY("羞羞的福利","逗娘"),
        ;
        private String desc;
        private String code;

        public String getDesc() {
            return desc;
        }

        public String getCode() {
            return code;
        }

        ShyTypeEnum(String desc, String code) {
            this.desc = desc;
            this.code = code;
        }
    }
    /**
     * 平台枚举
     */
    public enum ChannelEnum {
        H5("h5","0"),
        IOS("iOS","1"),
        ANDROID("Android","2")
        ;
        private String desc;
        private String code;

        public String getDesc() {
            return desc;
        }

        public String getCode() {
            return code;
        }

        ChannelEnum(String desc, String code) {
            this.desc = desc;
            this.code = code;
        }
    }
    /**
     * 是否通过审核枚举
     */
    public enum approvedEnum {
        APPROVED("已通过",1, false),
        NOT_APPROVED("未通过",0, true)
        ;
        private String desc;
        private double code;
        private boolean status;

        public String getDesc() {
            return desc;
        }

        public double getCode() {
            return code;
        }

        public boolean isStatus() {
            return status;
        }

        approvedEnum(String desc, double code, boolean status) {
            this.desc = desc;
            this.code = code;
            this.status = status;
        }
    }

    /**
     * 轻量级的存储
     * 枚举
     */
    public enum SharedPreferencesEnum {
        PASSED("boolean", "是否通过审核,true为已通过",1),
        PUSH_SHY_ID("String", "推送来的段子id", 1);


        private String type;
        private String desc;
        private Integer code;

        public String getType() {
            return type;
        }
        public String getDesc() {
            return desc;
        }
        public Integer getCode() {
            return code;
        }

        SharedPreferencesEnum(String type, String desc, Integer code) {
            this.type = type;
            this.desc = desc;
            this.code = code;
        }
    }

}
